<template>
<div class="container">
  <i v-if="isSecond === 1" class="el-icon-arrow-left" align="left" @click="back"></i>
  <span>{{ title }}</span>
</div>
</template>

<script>
export default {
  name: 'top',
  props: [
    'title',
    'isSecond'
  ],
  methods: {
    back () {
      this.$router.back()
    }
  }
}
</script>

<style lang="stylus" scoped>
.container
  width: 100vw
  height: 6vh
  background: linear-gradient(90deg, #3A62FF 0%, #4C95FD 100%);
  color: white
  letter-spacing 2px
  text-align center
  line-height 6vh
  font-size: 1.2rem
.el-icon-arrow-left
  position: absolute;
  left: 4vw
  top: 1.8vh
</style>
